<?php
	require_once("global.php");
	require_once("modules/settings_mod.php");
	require_once("modules/base_mod.php");
?>
<html>
<head>
<link rel="stylesheet" href="main.css">
<script src="main.js" type="text/javascript"></script>
<script src="info.js" type="text/javascript"></script>
</head>
<title><?php echo(SettingsMod::PAGE_TITLE." :: Main"); ?></title>
<body>
	<h1 align="center"><?php echo(SettingsMod::MAIN_PAGE_TITLE); ?></h1>
	<table align="center" width="900">
	<tr>
		<td align="center">
		<img src="<?php echo(SettingsMod::MAIN_PAGE_IMAGE); ?>" style="border: 2px ridge rgb(238, 238, 238);"><br><br>
		<b><?php echo(SettingsMod::MAIN_PAGE_DESCRIPTION); ?></b><br>
		</td>
	</tr>
	<tr>
		<td align="center">
			<br><b>Active users during the past 5 minutes:</b><br>
<?php
	$conn = BaseMod::getConnection();
	$d=date('c',time()-5*60);
             $q=mysql_query("select username, IP from navigation where time>'$d'");
             if(mysql_affected_rows()>0){
	             print "<ul>";
	             while($users=mysql_fetch_array($q)){
	             	print "<li>{$users[0]}&nbsp;{$users[1]}</li>";
	             }
	             print "</ul>";
             } else
             	print "No active users..."
?>
		</td>
	</tr>
	</table>
	<div id="tipBox"></div>
</body>
</html>